using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using YABlog.BLL;

public partial class EditCategory : System.Web.UI.Page
{
    CategoriesAction cat = new CategoriesAction();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            Response.Redirect("Login.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if(TextBox1.Text != "")
        {
            cat.AddCategory(TextBox1.Text);
            Response.Redirect("Categories.aspx");
        }
    }
}
